<!--
 * @Author: Leo.wang wanglizhigs@163.com
 * @Date: 2023-11-29 09:51:05
 * @LastEditors: Leo.wang wanglizhigs@163.com
 * @LastEditTime: 2024-01-30 23:14:00
 * @FilePath: /tuberculosis_screening_app/src/modules/center/src/index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="page">
    <Header></Header>
    <div class="grid column_4 gap_xs">
      <div class="grid-item">
        <div class="menu" @click="navigate('/modules/patient/src/index')">
          <van-icon class="menu-icon" name="completed-o" />
          <p class="menu-name">采集</p>
        </div>
      </div>
      <div class="grid-item">
        <div class="menu" @click="navigate('/modules/PPD/src/index')">
          <van-icon class="menu-icon" name="orders-o" />
          <p class="menu-name">PPD</p>
        </div>
      </div>
      <div class="grid-item">
        <div class="menu" @click="navigate('/modules/DR/src/index')">
          <van-icon class="menu-icon" name="sign" />
          <p class="menu-name">DR</p>
        </div>
      </div>
      <div class="grid-item">
        <div class="menu" @click="navigate('/modules/CT/src/index')">
          <van-icon class="menu-icon" name="credit-pay" />
          <p class="menu-name">CT</p>
        </div>
      </div>
      <div class="grid-item">
        <div
          class="menu"
          @click="navigate('/modules/sputum/src/index')"
        >
          <van-icon class="menu-icon" name="idcard" />
          <p class="menu-name">痰检</p>
        </div>
      </div>
      <div class="grid-item">
        <div class="menu" @click="navigate('/modules/laboratory/src/index')">
          <van-icon class="menu-icon" name="like-o" />
          <p class="menu-name">实验室</p>
        </div>
      </div>
      <div class="grid-item">
        <div class="menu" @click="navigate('/modules/diagnose/src/index')">
          <van-icon class="menu-icon" name="cluster-o" />
          <p class="menu-name">诊断</p>
        </div>
      </div>
      <div class="grid-item">
        <div class="menu" @click="navigate('/modules/ECG/src/index')">
          <van-icon class="menu-icon" name="notes-o" />
          <p class="menu-name">心电图</p>
        </div>
      </div>
    </div>

    <div class="section py_xs pitch_sm">
      <van-cell-group inset class="row mx_xs">
        <van-cell
          icon="location-o"
          title="筛查统计"
          @click="navigate('/modules/patient/src/statistics')"
          is-link
        />
      </van-cell-group>
      <van-cell-group inset class="row mx_xs">
        <van-cell
          icon="location-o"
          title="单位修改"
          is-link
          value="色达县疾控中心"
        />
        <van-cell icon="location-o" title="修改密码" is-link />
      </van-cell-group>
    </div>

    <div class="footer px_xs py_md">
      <van-button type="primary" block>退出</van-button>
    </div>
  </div>
</template>

<script>
import { defineComponent, computed } from "vue";
import { getUser } from "../api/index.service";
import userCenterStore from "../store/index";
import Header from "../components/header.vue";
import { navigate } from "@/service/navigate";

export default defineComponent({
  name: "Center",
  components: {
    Header,
  },
  setup() {
    const user = getUser();
    const centerStore = userCenterStore();

    console.log("user", user, centerStore);
    const count = computed(() => centerStore.count);
    function increment() {
      centerStore.increment();
    }
    function decrement() {
      centerStore.decrement();
    }
    return {
      user,
      count,
      increment,
      decrement,
      navigate,
    };
  },
});
</script>

<style>
.page {
  background: #eeeeee;
  width: 100%;
  height: 100%;
}

.footer {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  box-sizing: border-box;
}
</style>

